/// author：william on 2021/3/30 11:32
/// email：362661044@qq.com
extension ExtensionString on String {

  int tryParseInt() {
    if (this == null) return null;
    return int.tryParse(this);
  }

  double tryParseDouble() {
    if (this == null) return null;
    return double.tryParse(this);
  }

  String trimAll() {
    if (this == null) return null;
    final RegExp reg = RegExp(r"\s+");
    return this.replaceAll(reg, "");
  }

}
